/**
 * Created with Intellij IDEA.
 * Description:
 * User:Lenovo
 * Date:2024-12-05
 * Time:19:10
 */
class Shape {
    //属性....
    public void draw() {
        System.out.println("画图形！");
    }
}
class Rect extends Shape{
    @Override
    public void draw() {
        System.out.println("♦");
    }
}
class Cycle extends Shape {
    @Override
    public void draw() {
        System.out.println("●");
    }
}
public class Text {
    public static void main(String[] args) {
        Shape[] array = {new Rect(),new Cycle(),new Rect(),new Cycle()};
        for(Shape s:array){
            s.draw();
        }
    }
}
